Updated home page

This commit is contained in:
Fabio Manganiello 2024-05-27 00:30:13 +02:00
parent d7ce9113bc
commit 552461f8ef

View file

@ -41,13 +41,13 @@
<a href="https://blog.platypush.tech">Blog</a>
</div>
<div class="item">
<a href="https://git.platypush.tech/platypush/platypush/wiki">Wiki</a>
<a href="https://github.com/blacklight/platypush/wiki">Wiki</a>
</div>
<div class="item">
<a href="https://f-droid.org/en/packages/tech.platypush.platypush/" target="_blank">App</a>
</div>
<div class="item">
<a href="https://social.platypush.tech" target="_blank">Social</a>
<a href="https://lemmy.platypush.tech/c/platypush" target="_blank">Lemmy</a>
</div>
</div>
@ -111,11 +111,8 @@
<p>
Extensions may come with optional sets of additional dependencies, and they can be easily installed
through <tt>pip</tt> - see the <a
href="https://git.platypush.tech/platypush/platypush/src/branch/master/setup.py#L85"
target="_blank"><tt>setup.py</tt></a> for a full list of supported extras. The <a
href="https://docs.platypush.tech" target="_blank">documentation</a> also provided the required
dependencies for each integration.
through <tt>pip</tt> extras. The <a href="https://docs.platypush.tech"
target="_blank">documentation</a> also provides the required dependencies for each integration.
</p>
</div>
@ -166,13 +163,12 @@
</div>
<div class="right">
<div class="code"><span class="keyword">from</span> platypush.event.hook <span class="keyword">import</span> hook
<span class="keyword">from</span> platypush.utils <span class="keyword">import</span> run
<span class="keyword">from </span>platypush.message.event.zigbee.mqtt <span class="keyword">import</span> ZigbeeMqttDevicePropertySetEvent
<div class="code"><span class="keyword">from</span> platypush <span class="keyword">import</span> run, when
<span class="keyword">from </span>platypush.events.zigbee.mqtt <span class="keyword">import</span> ZigbeeMqttDevicePropertySetEvent
<span class="keyword">@hook</span>(ZigbeeMqttDevicePropertySetEvent, device=<span class="string">'My motion sensor'</span>)
<span class="keyword">def</span> on_sensor_value_change(event, **ctx):
has_motion = event.args.get(<span class="string">'properties'</span>, {}).get(<span class="string">'motion'</span>)
<span class="keyword">@when</span>(ZigbeeMqttDevicePropertySetEvent, device=<span class="string">'My motion sensor'</span>)
<span class="keyword">def</span> on_sensor_value_change(event):
has_motion = event.properties.get(<span class="string">'motion'</span>)
<span class="comment"># Turn on the lights when motion is detected</span>
<span class="keyword">if</span> has_motion <span class="keyword">is</span> <span class="string">True</span>:
run(<span class="string">'light.hue.on'</span>)
@ -345,19 +341,19 @@
</p>
<ul>
<li>Open a <a href="https://git.platypush.tech/platypush/platypush/issues" target="_blank">
Gitea issue</a>.</li>
<li>Open an <a href="https://git.platypush.tech/platypush/platypush/issues" target="_blank">
issue</a>.</li>
<li>Submit a <a href="https://git.platypush.tech/platypush/platypush/pulls" target="_blank">
pull request</a>.</li>
<li><a href="mailto:admin@platypush.tech" target="_blank">Email us</a>.</li>
<li>Give a shout on our <a rel="me" href="https://social.platypush.tech/@blacklight"
<li>Give me a shout on our <a rel="me" href="https://manganiello.social/@fabio"
target="_blank">Mastodon instance</a>.</li>
<li>Join the chat on <a href="https://matrix.to/#/#platypush:matrix.platypush.tech">Matrix</a>
or IRC (<tt>irc.platypush.tech:6697</tt>, SSL only).</li>
<li>Reach out on <a href="https://lemmy.platypush.tech/c/platypush" target="_blank">
Lemmy</a>.</li>
<li>Donations to cover the costs for hosting the infrastructure <a
href="https://paypal.me/fabiomanganiello" target="_blank">are also welcome</a>!
href="https://paypal.me/fabiomanganiello" target="_blank">are also welcome</a>!
</li>
</ul>
</div>