J3n50m4t / Home-Assistant-DreamScreen-Service

Home Assistant Service for sending commands to a Wifi enabled DreamScreen
MIT License
31 stars 15 forks source link

Cant Set Color or Ambient Scene #22

Closed YourAvgBear closed 4 years ago

YourAvgBear commented 5 years ago

Hey Guys,

I got this awesome service integrated into my Home Assistant setup and am now working on setting up my scripts and automations for it. I've been having an issue though. Input changes, mode changes, and brightness settings all work perfectly, but once in ambient mode I can not set a specific color or change the ambient scene. I've tried setting it to ambient mode and selecting a color in one script like this:

dreamscreen_mode_ambient:
  alias: "DreamScreen - Mode Ambient"
  sequence:
    - service: dreamscreen.set_mode
      data:
        entity_id: dreamscreen.dreamscreen
        mode: 3
    - service: dreamscreen.set_ambiance_color
      data:
        entity_id: dreamscreen.dreamscreen
        color: #40e0d0

As well as calling a script to set it to ambient mode first and then using another script to try and set a specific color or scene. So far neither of these approaches has worked. The DreamScreen will just return to the last setting it was in for ambient mode and stay there. I have also noticed that any command in a script following a command to change the color or change the scene will not happen. For example, a script that reads like this will switch to ambient mode but then do nothing else:

dreamscreen_mode_ambient:
  alias: "DreamScreen - Mode Ambient"
  sequence:
    - service: dreamscreen.set_mode
      data:
        entity_id: dreamscreen.dreamscreen
        mode: 3
    - service: dreamscreen.set_ambiance_color
      data:
        entity_id: dreamscreen.dreamscreen
        color: #40e0d0
    - service: dreamscreen.set_brightness
      data:
        entity_id: dreamscreen.dreamscreen
        brightness: 75

The color and brightness do not change. It's entirely possible that I'm doing something wrong because I'm brand new to most of this stuff, but the fact that I have everything else working makes me think otherwise.

J3n50m4t commented 5 years ago

Ok can't reproduce it over here. I've tried a testscript similar to yours, and its working with my 4k. So i removed the bug label.

This is working for me (switching modes and brightness)

Seems like dreamscreen drops some commands if you are to fast (so without the delay it differs every time - but I've experienced the same with their app, so it's not releated to this project. The strange thing is, that your first one works? Could you try with some delays or provide a few logs, if it produces some?

dreamscreen_test_mode:
  alias: "DreamScreen Test Mode"
  sequence:
    - service: dreamscreen.set_mode
      data:
        entity_id: dreamscreen.dream_screen
        mode: 1
    - service: dreamscreen.set_brightness
      data:
        entity_id: dreamscreen.dream_screen
        brightness: 50
    - delay:
        seconds: 3
    - service: dreamscreen.set_mode
      data:
        entity_id: dreamscreen.dream_screen
        mode: 3
    - service: dreamscreen.set_ambient_scene
      data:
        entity_id: dreamscreen.dream_screen
        scene: 1
    - service: dreamscreen.set_brightness
      data:
        entity_id: dreamscreen.dream_screen
        brightness: 100
    - delay:
        seconds: 3
    - service: dreamscreen.set_ambient_color
      data:
        entity_id: dreamscreen.dream_screen
        color: "#0000ff"
    - delay:
        seconds: 3
    - service: dreamscreen.set_ambient_color
      data:
        entity_id: dreamscreen.dream_screen
        color: "#ff0000"
J3n50m4t commented 4 years ago

Closing this because I think its fixed in #26 and corresponding PR

Feel free to Reopen if its still a thing.