sureha
sureha copied to clipboard
Create a proper readme
including general readme things and cool tips like the one from @xbmcnut below

script:
set_kobe_inside:
alias: 'Set Kobe Inside'
sequence:
- service: sureha.set_pet_location
data:
pet_id: '123456' #Kobe's Code
where: Inside
And the code for button shown above. Icon changes from green to red when pet goes outside.
entity: binary_sensor.pet_kobe
icon: mdi:cat
layout: icon_name_state
show_name: false
show_state: true
styles:
icon:
- color: >
[[[ if (states['binary_sensor.pet_kobe'].state === 'on') return "green";
return "red"; ]]]
tap_action:
action: more-info
hold_action:
action: call-service
service: script.set_kobe_inside
type: custom:button-card
Originally posted by @xbmcnut in https://github.com/benleb/sureha/issues/5#issuecomment-916545238