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

Sensors for current "mode" and current "source" #29

Open
XRyu opened this issue Feb 29, 2020 · 3 comments
Open

Sensors for current "mode" and current "source" #29

XRyu opened this issue Feb 29, 2020 · 3 comments
Labels
enhancement New feature or request

Comments

@XRyu
Copy link

XRyu commented Feb 29, 2020

Hey Gregory, i would love to see an integration of a sensor exposed to HA, which gives current State of the source and mode. Bonus would be a sensor with the name of the current source as in the DS-App but thats only cosmetics for me :)

@zanix
Copy link
Collaborator

zanix commented Mar 1, 2020

If you need a sensor now, you could make a custom sensor template

sensor:
  - platform: template
    sensors:
      dreamscreen_living_room_mode:
        friendly_name: Dreamscreen
        value_template: >-
          {% if is_state_attr('dreamscreen.living_room', 'device_mode', 1) %}
            Video
          {% elif is_state_attr('dreamscreen.living_room', 'device_mode', 2) %}
            Music
          {% elif is_state_attr('dreamscreen.living_room', 'device_mode', 3) %}
            Ambient
          {% else %}
            Off
          {% endif %}
        icon_template: >
          {% if is_state_attr('dreamscreen.living_room', 'device_mode', 1) %}
            mdi:television
          {% elif is_state_attr('dreamscreen.living_room', 'device_mode', 2) %}
            mdi:music-note
          {% elif is_state_attr('dreamscreen.living_room', 'device_mode', 3) %}
            mdi:lightbulb-on
          {% else %}
            mdi:power-off
          {% endif %}

@J3n50m4t J3n50m4t added the enhancement New feature or request label Mar 1, 2020
@XRyu
Copy link
Author

XRyu commented Mar 1, 2020

Oh great! This helped a lot. As i didnt know there are any state attributes :D
With this everything i wanted to do was possible :)

@J3n50m4t
Copy link
Owner

J3n50m4t commented Mar 2, 2020

Will keep this Open. I like the idea.

Sent with GitHawk

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

No branches or pull requests

3 participants