export interface HAState {
  entity_id: string;
  state: string;
  attributes: Record<string, any>;
}

export interface HAStates {
  demo: boolean;
  states: Record<string, HAState>;
}

export function getBrightnessPct(brightness?: number): number {
  if (!brightness) return 0;
  return Math.round((brightness / 255) * 100);
}

export function pctToBrightness(pct: number): number {
  return Math.round((pct / 100) * 255);
}
