I am using mqtt light to set the brightness and turn on the screen.
So far I have managed to turn on the screen.
I cant set the brightness…
lights.yaml:
The reason my brightness_command_topic is like that, is because I am testing things and almost made it… kinda…
I need help with that.
When I publish from developer tools the message I get this response from mosquitto:
Ok, I made some progress here. I have managed to set the brightness and turn on the screen. But I am having trouble on getting the status of the screen combined with brightness. I can only get the status. I tried this:
- platform: mqtt
schema: template
name: 'Galaxy Screen'
state_topic: 'home/devices/master/galaxy/state'
# state_template: '{% if value_json.screenOn == true %}on{% else %}off{% endif %}' // This worked for the screen status only, but I get no brightness status.
state_template: >
{
{% if value_json.screenOn == true %}on{% else %}off{% endif %}
{%- if brightness is defined -%}
,'brightness': {{ brightness }}
{%- endif -%}
}
command_topic: 'home/devices/master/galaxy/command'
command_on_template: >
{"wake": true
{%- if brightness is defined -%}
,'brightness': {{ brightness }}
{%- endif -%}}
command_off_template: >
{"wake": false
{%- if brightness is defined -%}
,'brightness': {{ brightness }}
{%- endif -%}}
brightness_command_topic: 'home/devices/master/galaxy/command'
brightness_state_topic: 'home/devices/master/galaxy/state'
brightness_value_template: '{{value_json.brightness}}'
Can someone help me?
Also ignore the command_off_template as there is no option to turn off the screen according to wallpanel docs.
EDIT: Here is the wallpanel state when the screen is on or off:
I have used the following sensor, to be able to turn on the screen of the tablet and it works really well, but I have a problem the button is not lit, that is, the pulse turns on but immediately turns off even when the screen is on, there is a way to adjust this problem