Files
Cosmo 9044869fa4
All checks were successful
Deploy to Coolify / deploy (push) Successful in 44s
feat: initial smart home dashboard
- Next.js 14 + TypeScript + Tailwind CSS
- Glassmorphism design with ambient orbs
- Cards: Light x2, Temperature, AirPurifier, Tasks, Weather, Savings
- Home Assistant integration (demo mode if no token)
- Vikunja tasks API
- Pulse savings API
- wttr.in weather
- Framer Motion animations
- Dark/light theme toggle
- Bottom navigation
- Dockerfile for deployment
2026-04-22 10:00:41 +00:00

20 lines
426 B
TypeScript

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);
}