#Dynamic Header Visibility Based on Device Orientation in Home Assistant

1 messages · Page 1 of 1 (latest)

deep osprey
#

Hi everyone,

I'm trying to achieve a responsive layout in my Home Assistant dashboard where the header is hidden when my phone is in landscape orientation (rotated 90 degrees) but remains visible in portrait orientation.

cedar mauve
#

If this will be a dashboard that will only be used by you (and on your phone) then I have a solution for you. Use Kiosk Mode. In the HA app on your phone, enable the Screen Rotation sensor. Add this bit of code into your Raw Editor of the dashboard (replacing your sensor entity name): ```yaml
kiosk_mode:
entity_settings:
- entity:
sensor.s22_ultra_screen_rotation: 90
kiosk: true
- entity:
sensor.s22_ultra_screen_rotation: 270
kiosk: true