first of all: simply love your project (if i would get the output, that you have ;-) )
most likely im just not skilled enough yet ;-)
so, im having a deebot T9+
to make sure, im not too stupid, i called it susi and i reloaded the integration.
ok, susi now picks up my rooms as attributes, so far so good (e.g. bedroom, bathroom, kids_room, living_room)
so i thought good, lets just continue with your example, so i copied your code into my configuration.yaml (for the backend) and i deactivated scripts: !include scripts.yaml and so on (just for testing)
i copied the button card template information into my lovelace raw configeditor (fyi, my first time, so maybe i did something wrong here) and copied your card configuration into a new card, but i always receive error messages...
instead of my rooms as buttons (or as in the example only the living room) i get this:
_ButtonCardJSTemplateError: TypeError: Cannot read properties of undefined (reading 'state') in 'return entity.state'
tap_action:
action: call-service
service: script.deebot_room_queue
service_data:
queue: input_text.deebot_susi_queue
room: living_room
type: custom:button-card
group_expand: false
hold_action:
action: none
double_tap_action:
action: none
layout: vertical
size: 40%
color_type: icon
show_name: true
show_state: false
show_icon: true
show_units: true
show_label: false
show_entity_picture: false
show_live_stream: false
card_size: 3
color: var(--text-color)
variables:
lock_enabled: |
[[[ return ['cleaning', 'paused'].includes(states['vacuum.susi'].state) ]]]
state:
Hi,
first of all: simply love your project (if i would get the output, that you have ;-) ) most likely im just not skilled enough yet ;-)
so, im having a deebot T9+ to make sure, im not too stupid, i called it susi and i reloaded the integration. ok, susi now picks up my rooms as attributes, so far so good (e.g. bedroom, bathroom, kids_room, living_room) so i thought good, lets just continue with your example, so i copied your code into my configuration.yaml (for the backend) and i deactivated scripts: !include scripts.yaml and so on (just for testing) i copied the button card template information into my lovelace raw configeditor (fyi, my first time, so maybe i did something wrong here) and copied your card configuration into a new card, but i always receive error messages...
instead of my rooms as buttons (or as in the example only the living room) i get this: _ButtonCardJSTemplateError: TypeError: Cannot read properties of undefined (reading 'state') in 'return entity.state' tap_action: action: call-service service: script.deebot_room_queue service_data: queue: input_text.deebot_susi_queue room: living_room type: custom:button-card group_expand: false hold_action: action: none double_tap_action: action: none layout: vertical size: 40% color_type: icon show_name: true show_state: false show_icon: true show_units: true show_label: false show_entity_picture: false show_live_stream: false card_size: 3 color: var(--text-color) variables: lock_enabled: | [[[ return ['cleaning', 'paused'].includes(states['vacuum.susi'].state) ]]] state:
and where the services are, i get this error: _ButtonCardJSTemplateError: TypeError: Cannot read properties of undefined (reading 'state') in 'return ((!states['input_text.deebot_susi_queue'].state || states['input_text.deebot_susi_qu...' tap_action: action: call-service service_data: entity_id: vacuum.susi service: script.deebot_clean type: custom:button-card group_expand: false hold_action: action: none double_tap_action: action: none layout: vertical size: 40% color_type: icon show_name: true show_state: false show_icon: true show_units: true show_label: false show_entity_picture: false show_live_stream: false card_size: 3 color: var(--text-color) entity: vacuum.susi lock: enabled: | [[[ return variables.enabled ]]] duration: 5 unlock: tap exemptions: [] styles: card: