Skip to content
This repository was archived by the owner on Dec 12, 2024. It is now read-only.
This repository was archived by the owner on Dec 12, 2024. It is now read-only.

[service] New - Toggle_Pet_Location #6

@ChristophCaina

Description

@ChristophCaina

Available services:

  • SureHA.Set_Lock_State
  • SureHA.Set_Pet_Location

To implement a status information, if a pet is at home or away, you can use the tile_card with the following service call:

script.toggle

icon_tap_action:
  action: call-service
  service: script.toggle
  target:
    entity_id: script.1703787194284

the script should be like this:

alias: change Mia's Status
sequence:
  - choose:
      - conditions:
          - condition: state
            entity_id: binary_sensor.pet_mia
            attribute: where
            state: 1
        sequence:
          - service: sureha.set_pet_location
            data:
              pet_id: "xxx"
              where: Outside
      - conditions:
          - condition: state
            entity_id: binary_sensor.pet_mia
            attribute: where
            state: 2
        sequence:
          - service: sureha.set_pet_location
            data:
              pet_id: "xxx"
              where: Inside

It would also be nice, if you were able to call a service directly, something like: sureha.toggle_pet_location - this would then change the pet's state from home to away and vice versa without the need to create seperate scripts for each pet.

Metadata

Metadata

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions