benleb / sureha

SureHA 🐾 monitor & control your Sure Petcare devices via Home Assistant
Apache License 2.0
21 stars 12 forks source link

Create a proper readme #19

Open benleb opened 3 years ago

benleb commented 3 years ago

including general readme things and cool tips like the one from @xbmcnut below


image

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