1 line
1.7 KiB
Plaintext
1 line
1.7 KiB
Plaintext
<!-- SC_OFF --><div class="md"><p>For those unpatiently waiting for gnome 41 and are running home assistant.</p> <p>Add the following to your sensors to check the package version every hour:</p> <pre><code>- platform: command_line name: Gnome Shell Version json_attributes: - pkgver - pkgrel - repo command: "curl https://archlinux.org/packages/search/json/?name=gnome-shell | python -c \"import sys, json; print(json.dumps(json.load(sys.stdin)['results'][-1]))\"" value_template: "{{ value_json.pkgver | float }}-{{ value_json.pkgrel }}" scan_interval: 600 </code></pre> <p>You can use it in sensors to see the current gnome-shell version and repo with an entities card:</p> <pre><code>type: entities entities: - entity: sensor.gnome_shell_version icon: mdi:gnome - type: attribute entity: sensor.gnome_shell_version attribute: repo name: Repository icon: mdi:database </code></pre> <p>With an automation you can get a notification of your choice. e.g. getting one on my mobile app</p> <pre><code>alias: Gnome 41 in Arch description: '' trigger: - platform: template value_template: >- {% if state_attr('sensor.gnome_shell_version', 'pkgver') | float > 41 %} true {% endif %} condition: [] action: - service: notify.mobile_app_mi_a2 data: message: >- Gnome 41 released in {{ state_attr('sensor.gnome_shell_version', 'repo') }} mode: single </code></pre> </div><!-- SC_ON -->   submitted by   <a href="https://www.reddit.com/user/raetiacorvus"> /u/raetiacorvus </a> <br/> <span><a href="https://www.reddit.com/r/archlinux/comments/q795mr/are_we_gnome_41_yet/">[link]</a></span>   <span><a href="https://www.reddit.com/r/archlinux/comments/q795mr/are_we_gnome_41_yet/">[comments]</a></span> |