Quantcast
Channel: Configuration - Home Assistant Community
Viewing all articles
Browse latest Browse all 95414

Help with my first bit of "programming" - switch to control sonos

$
0
0

@Matt_Barnes wrote:

So up until now I have been doing bits in HA (hassio) including setting up hue lights, a couple of graphs, some data displays for speedtest.net and my synology nas and most recently the skyq custom component.

Until now it has all been UI and Lovelace type stuff really.

Next step, I have a friends of hue switch (sensor.friends_of_hue_switch_1) which has 4 buttons and changes the state to things like “left_upper_release”

I would like to write automation? (or script not entirely sure which) so that when “left_lower_release” is set it plays my sonos.

I am not entirely sure where to start with this, should I use the entity as a sensor? If I set it to play when “left_lower_release” what happens if “left_upper_release” is then pressed? does the state of the sensor mean sonos stopped, which would be unwanted, or can I write it so that each press of the lower left button starts or stops sonos.

Feel like this is really basic, but on the basis I am not sure whether I need automation or script and how to treat a sensor like a switch I need some pointers on where to start.

Thanks!

Posts: 4

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 95414

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>