Hass-cli with xfce4 panels

I just had a eureka moment to do with xfce4 panels!


here we have the temps and some buttons in Ubuntu using Xfce4 Desktop Environment

Firstly I installed the old hass-cli tool

Just heads up its broken because the new version of CLICK is Incompatible,
Just run:
pip3 install click==8.0.4

that by itself is super useful but be aware that its not perfect

I made a bash script to activate scenes:

#!/bin/sh
export HASS_SERVER=http://192.168.0.200:80
export HASS_TOKEN=<Long-Lived Access Token goes here>
hass-cli service call scene.turn_on --arguments entity_id=scene.room_blue_bright > /dev/null

And a bash script to formatting the data for the generic monitor panel:

#!/bin/bash

export HASS_SERVER=http://192.168.0.200:80
export HASS_TOKEN=<Long-Lived Access Token goes here>

temp1="$(hass-cli -o json state list sensor.temp | jq -r .[].state)" 
temp2="$(hass-cli -o json state list sensor.room_temp | jq -r .[].state)"
temp3="$(hass-cli -o json state list sensor.outside_temp | jq -r .[].state)"

printf "<txt>Lounge:${temp1}  Room:${temp2}  Outside:${temp3}  </txt>"

I spent way to much time before I released I needed to export the HASS_SERVER and HASS_TOKEN values in every script. :man_facepalming:

From there its all GUI setup

I’m so happy i can control home-assistant from my Linux machine !!!