<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Now I'm getting somewhere, HA turns screen on and off :-)]]></title><description><![CDATA[<p dir="auto">Ok, finally I found the right module. So the remote module in MagicMirror (MMM-Remote-Control), and then ‘rest_command:’ setup in HA.<br />
That way the motionsensor can turn the screen on and off in the mirror. For now I’ve made it simple with just defining four commands, two for on / off and two for dim / undim. And then just use those services in HA automations.<br />
Works perfectly.<br />
Now I need to turn some modules on and off depending on the time of day.</p>
<p dir="auto">The HA commands:</p>
<pre><code>rest_command:
  turn_off_mm_screen:
    url: http://IP:8080/api/monitor/off
  turn_on_mm_screen:
    url: http://IP:8080/api/monitor/on
  dim_mm_screen:
    url: http://IP:8080/api/brightness/75
  undim_mm_screen:
    url: http://IP:8080/api/brightness/100
</code></pre>
<p dir="auto">One of the automations (at night)</p>
<pre><code>- id: '1557033756115'
  alias: Turn on bathroom light at night
  trigger:
  - entity_id: binary_sensor.bathroom_movement
    from: 'off'
    platform: state
    to: 'on'
  condition:
  - after: '23:00'
    before: '7:59'
    condition: time
  - condition: state
    entity_id: light.spejl
    state: 'off'
  action:
  - data:
      brightness_pct: 10
      entity_id: light.spejl
    service: light.turn_on
  - data: {}
    service: rest_command.turn_on_mm_screen
  - data: {}
    service: rest_command.undim_mm_screen
</code></pre>
<p dir="auto">Next step would be to modify rest_command so that I don’t have one for each action, but send a payload that is modified to the command that I want.</p>
]]></description><link>https://forum.magicmirror.builders/topic/11200/now-i-m-getting-somewhere-ha-turns-screen-on-and-off</link><generator>RSS for Node</generator><lastBuildDate>Fri, 17 Jul 2026 04:36:36 GMT</lastBuildDate><atom:link href="https://forum.magicmirror.builders/topic/11200.rss" rel="self" type="application/rss+xml"/><pubDate>Sun, 22 Sep 2019 08:53:32 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Now I'm getting somewhere, HA turns screen on and off :-) on Mon, 07 Dec 2020 01:47:08 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/fribse" aria-label="Profile: fribse">@<bdi>fribse</bdi></a> Nice job!   I’m strictly using home assistant.  Not tied to Magic Mirror at all.   Home Assistant is a cool thing and I have it running my entire house :)</p>
]]></description><link>https://forum.magicmirror.builders/post/85484</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/85484</guid><dc:creator><![CDATA[cowboysdude]]></dc:creator><pubDate>Mon, 07 Dec 2020 01:47:08 GMT</pubDate></item><item><title><![CDATA[Reply to Now I'm getting somewhere, HA turns screen on and off :-) on Sun, 06 Dec 2020 13:36:48 GMT]]></title><description><![CDATA[<p dir="auto">Very useful. Thx!</p>
]]></description><link>https://forum.magicmirror.builders/post/85472</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/85472</guid><dc:creator><![CDATA[mjmare]]></dc:creator><pubDate>Sun, 06 Dec 2020 13:36:48 GMT</pubDate></item></channel></rss>