Skip to content
This repository has been archived by the owner on Jul 19, 2024. It is now read-only.

[service] New - Toggle_Pet_Location #6

Open
ChristophCaina opened this issue Jan 1, 2024 · 0 comments
Open

[service] New - Toggle_Pet_Location #6

ChristophCaina opened this issue Jan 1, 2024 · 0 comments
Assignees
Labels
enhancement New feature or request feature request

Comments

@ChristophCaina
Copy link
Owner

ChristophCaina commented Jan 1, 2024

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.

@ChristophCaina ChristophCaina added enhancement New feature or request feature request labels Jan 1, 2024
@ChristophCaina ChristophCaina self-assigned this Jan 1, 2024
@ChristophCaina ChristophCaina changed the title new Service: Toggle_Pet_Location [service] New - Toggle_Pet_Location Jan 1, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request feature request
Projects
None yet
Development

No branches or pull requests

1 participant