Skip to content
Discussion options

You must be logged in to vote

Hi narrcom.

Did you find some time to try phozel's solution?

Here's the code from phozel's post:

          - entity: sensor.date_time
            element: sleep_timer
            state_action:
              - service: floorplan.text_set
                service_data:
                  element: sleep_timer
                  text: |
                    >
                      if (entity.state === 'idle') {
                        return "OFF";
                      }
                      else if (entity.state === 'paused') {
                        return "Paused";
                      }
                      if (entity.state === 'active') {
                        var currentD = new Date();

Replies: 2 comments 4 replies

Comment options

You must be logged in to vote
3 replies
@pkozul
Comment options

pkozul Feb 10, 2021
Collaborator

@pkozul
Comment options

pkozul Feb 16, 2021
Collaborator

@narrcom
Comment options

Comment options

You must be logged in to vote
1 reply
@W1ngR1d3r
Comment options

Answer selected by pkozul
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants