Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Apple Watch: temperature report - all on one line #39

Open
jgeorge1983 opened this issue Jan 17, 2023 · 5 comments
Open

Apple Watch: temperature report - all on one line #39

jgeorge1983 opened this issue Jan 17, 2023 · 5 comments

Comments

@jgeorge1983
Copy link

Not sure if I'm doing something wrong here, but when I run the action it appears on one line/block of text rather than a newline per temperature? Also when I run the action I have to click on the notification to bring it up? not sure if thats an update to how actions run or a setting I have missed? See below for my code:

alias: "Apple Watch: temperature report"
description: ""
trigger:
  - platform: event
    event_type: ios.action_fired
    event_data:
      actionName: Temperature report
condition: []
action:
  - variables:
      iphone: >-
        notify.mobile_app_{{ trigger.event.data.sourceDeviceName.replace('-',
        '_') }}
  - service: "{{ iphone }}"
    data:
      title: Temperature
      message: >
        Living room: {{states('sensor.living_room_thermostat_current_temperature') }}°C
        Bedroom: {{ states('sensor.temperature_bedroom_temperature') }}°C Spare
        Spare Bedroom: {{ states('sensor.temperature_spare_bedroom_temperature') }}°C
        Thermostat: {{ state_attr('climate.living_room_thermostat', 'temperature') }}°C
        Outside: {{state_attr('sensor.temperature_outside_temperature', 'temperature') }}°C and it's {{ states('weather.home') }}
mode: parallel
@poudenes
Copy link

message: | instead of message: >

  - service: "{{ iphone }}"
    data:
      title: Temperature
      message: |
        Living room: {{states('sensor.living_room_thermostat_current_temperature') }}°C
        Bedroom: {{ states('sensor.temperature_bedroom_temperature') }}°C Spare
        Spare Bedroom: {{ states('sensor.temperature_spare_bedroom_temperature') }}°C
        Thermostat: {{ state_attr('climate.living_room_thermostat', 'temperature') }}°C
        Outside: {{state_attr('sensor.temperature_outside_temperature', 'temperature') }}°C and it's {{ states('weather.home') }}

For me is this working correct

@jgeorge1983
Copy link
Author

Thanks, that didn't make any difference on mine. Still had to tap the notification

image

@poudenes
Copy link

strange:

incoming-1B621E54-1D1B-4169-984D-B1E4556ABD25

This is my automation:

- id: "6d01583b-5445-4d61-95ec-739e8a7aec3a"
  alias: "Apple Watch - Temperature Report"
  mode: parallel
  trigger:
    - platform: event
      event_type: ios.action_fired
      event_data:
        actionName: "Temperature level"

  condition:
    - "{{ is_state('switch.ha_offline', 'off') }}"

  action:
    - service: notify.mobile_app_peter_iphone
      data:
        title: "Temperature Report"
        message: |
          Livingroom: {{ states('sensor.toilet_temperature') }} °C,
          Bedroom: {{ states('sensor.bedroom_temperature') }} °C,
          Bathroom: {{ states('sensor.bathroom_temperature') }} °C,
          Hallway: {{ states('sensor.hallway_temperature') }} °C,
          Kitchen: {{ states('sensor.kitchen_temperature') }} °C,
          Diningroom: {{ states('sensor.diningroom_temperature') }} °C,
          Toilet: {{ states('sensor.toilet_temperature') }} °C,
          Nest: {{ state_attr('climate.entryway', 'temperature') }} °C,
          Outside: {{ states('sensor.buienradar_temperature') }} °C.

@jgeorge1983
Copy link
Author

Now you're showing off ha, i just reformatted it and now they're all neatly on their own row, very strange. Thanks for the assist!!

Is there a way to make the conent pop up automatically as soon as I press "temperature report" without needing to press the notification?

@poudenes
Copy link

i don't know. I think that's not possible

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants