Hi all,
I know very little about the configuration required to achieve this and project to starting to loose all the fun and quickly becoming a chore.
I have a touch panel coming along nicely and managed to get most features and functions I require up and running, thanks mainly to this report i found using an identical device:
repo: https://github.com/strange-v/ha_deck
I trying to get a button checked status to be true when a media device is playing.
I have this working for light a connected via HA, when the light is on the button is checked.
You might laugh at what i have written here as i have very little experience with yaml / esphome and now need some assistance if anyone can provide the yaml required that would be great.
Current yaml snippets in question:
sensor:
- platform: homeassistant
id: den_media
name: "Den Media State"
entity_id: media_player.den
hd_device_wt32s3_86s:
id: device
brightness: 75
ha_deck:
id: deck
main_screen: ${SCREEN_MAIN}
inactivity:
period: 120 # seconds
blank_screen: true
on_inactivity_change:
lambda: |-
if (x) {
id(device).set_brightness(id(inactive_screen_brightness).state);
} else {
id(device).set_brightness(id(screen_brightness).state);
}
screens:
- name: ${SCREEN_MAIN}
widgets:
- type: button
position: 108, 316
text: Play
icon: ó°
toggle: false
enabled: return true;
checked: return id(den_media).state;
Basically I need the âplayingâ / âpausedâ state reported by the sensors to be converted to a state that âcheckedâ will accepted
This all complies fine but then in the logs i get:
[14:28:36][W][homeassistant.sensor:015]: âmedia_player.denâ: Canât convert âplayingâ to number!
Not sure why this would be number, assumer Boolean?
Any assistance at all with this would be great, copoilot / chatgpt where useless.