Command Line Switch with Condition

Hi Everyone,

First of all, Home Assistant is the bomb.

Just wanted to ask the experts about Command Line Switch.

Is it possible to have a condition on a Command Line Switch?

I have a command line switch configured that calls out send code using wiringPi to turn on and off an RF switch(sending the code is much accurate than using the RF component).

Although there are so many options to use, I choosed the Command Line Switch so I can point my emulated hue bridge by calling out the API for the state to be update on the Home Assistant page when it is triggered via Echo and Google home.

My problem is my RF device are using the same code to turn on and off the device, so even if the switch is already on when you issue an on command the Echo or Google Home the switch will be triggered and turn off.

will the value_template work on this? or will a condition work under Command Line Switch?

Thanks!

I am learning too but maybe if you could share you configuration sections for this, someone with a knowledge would chime in? and we all can learn? :slight_smile:

Sorry for the late reply.

The new version of HA Bridge now has an integration with home assistant which makes it easier to configure.

I will post some screenshots later.

which number is the new versio n(I have 3.5.1

HA Bridge 4.1.2
https://github.com/bwssytems/ha-bridge

how to upgrade it??

pi@raspberrypi:~/habridge $ wget https://github.com/bwssytems/ha-bridge/releases/download/{4.1.2}/ha-bridge-{4.1.2}.jar
--2017-02-01 19:39:43--  https://github.com/bwssytems/ha-bridge/releases/download/%7B4.1.2%7D/ha-bridge-%7B4.1.2%7D.jar
Resolving github.com (github.com)... 192.30.253.113, 192.30.253.112
Connecting to github.com (github.com)|192.30.253.113|:443... connected.
HTTP request sent, awaiting response... 404 Not Found
2017-02-01 19:39:44 ERROR 404: Not Found.

just download the .jar file and just point it to the new file when you run it.

java -jar ha-bridge-4.1.2.jar

of if you set it up as a service, just modify the service file example below.

[Unit]
Description=HA Bridge
Wants=network.target
After=network.target

[Service]
Type=simple

ExecStart=/usr/bin/java -jar -Dconfig.file=/home/pi/habridge/data/habridge.config /home/pi/habridge/ha-bridge-4.1.2.jar

[Install]
WantedBy=multi-user.target