Home Assistant beginners

Absolutely - basically just set it up in HA through ZHA -

Lots of quick tutorials about this:

But PM if you need any help!
Thanks for the tutorials. I bought a couple of the IKEA Tradfri shortcut buttons at the weekend and set one up over the last couple of evenings. As people suggested, they are far more responsive than the Shelly WiFi button. Setup was a bit trickier than I anticipated though!

After failing to pair for a while, I upgraded the firmware in the Conbee II stick last night which solved that issue. I then wasn’t registering any button clicks (in the developer tools event listener). I “reconfigured” it tonight (whatever that means!) in ZHA and it then started registering button clicks. I’ve now setup the blueprint from the video (incl. adding the text_input to configuration.yaml) and we’re all set - automation working.

A couple of oddities:
* Each quick button click seems to register 5-10 clicks in the event listener. Thankfully the automation only fires once. I have no idea how quick a button click they were anticipating!
* The battery was listed as 100% yesterday. It’s been sat unused for the day. 24 hours later, the battery now claims to be at 20%! I’ll check that out again tomorrow. I put it back in the box overnight with the battery in, so perhaps it’s been ‘pressed’ and madly sending out signals all night/day.
 
Each quick button click seems to register 5-10 clicks in the event listener. Thankfully the automation only fires once. I have no idea how quick a button click they were anticipating!
Scratch that. I’ve had it register 3 clicks in the same second. The second cancelled the first automation and my device didn’t get switched off. This is a device I want switching off 1min after it’s switched on. I’ll need to look into it some more. Hopefully there’s something like the single run mode you get in normal HA automations.
 
Thanks for the tutorials. I bought a couple of the IKEA Tradfri shortcut buttons at the weekend and set one up over the last couple of evenings. As people suggested, they are far more responsive than the Shelly WiFi button. Setup was a bit trickier than I anticipated though!

After failing to pair for a while, I upgraded the firmware in the Conbee II stick last night which solved that issue. I then wasn’t registering any button clicks (in the developer tools event listener). I “reconfigured” it tonight (whatever that means!) in ZHA and it then started registering button clicks. I’ve now setup the blueprint from the video (incl. adding the text_input to configuration.yaml) and we’re all set - automation working.

A couple of oddities:
* Each quick button click seems to register 5-10 clicks in the event listener. Thankfully the automation only fires once. I have no idea how quick a button click they were anticipating!
* The battery was listed as 100% yesterday. It’s been sat unused for the day. 24 hours later, the battery now claims to be at 20%! I’ll check that out again tomorrow. I put it back in the box overnight with the battery in, so perhaps it’s been ‘pressed’ and madly sending out signals all night/day.
Hey, good stuff - welcome to the party!

I can't say I've experienced this battery drain, although I've read about it. The two things I've seen is a) dud IKEA batteries - they're often not the best out of the box, so replacing fixes and b) initial firmware issues, upgrading this fixes the drain issue, ie:
 
Scratch that. I’ve had it register 3 clicks in the same second. The second cancelled the first automation and my device didn’t get switched off. This is a device I want switching off 1min after it’s switched on. I’ll need to look into it some more. Hopefully there’s something like the single run mode you get in normal HA automations.
Again the only time I've seen this was briefly when I bought some and they were on old firmware, so might be worth checking which firmware your switches are on and upgrading if needed?

Ikea's software is a little buggy IMO but more recent versions pretty stable
 
hi looking for some help with lighting automations, coming from HK and i moved everything to HA, set up a zigbee network and the only thing i am stuck at is sunset/sunrise dimmable lighting with motion sensors, as a work around i am using timed rather than sun, but would like to have it on at sunset and off at sunrise ?
 
hi looking for some help with lighting automations, coming from HK and i moved everything to HA, set up a zigbee network and the only thing i am stuck at is sunset/sunrise dimmable lighting with motion sensors, as a work around i am using timed rather than sun, but would like to have it on at sunset and off at sunrise ?
Yep, two ways - one is using the motion sensor itself (ie mine have lux sensors, so you can detect the light level and trigger using that), the other is using your location settings in home assistant to trigger it, ie something like this:


But basically you want to:

a) create automation
B) set the trigger to your motion sensors
C) set a condition that light level is more than X (or between sunset and sunrise)

And away you go!
 
Yep, two ways - one is using the motion sensor itself (ie mine have lux sensors, so you can detect the light level and trigger using that), the other is using your location settings in home assistant to trigger it, ie something like this:


But basically you want to:

a) create automation
B) set the trigger to your motion sensors
C) set a condition that light level is more than X (or between sunset and sunrise)

And away you go!
C) gets me confused I can set it up but can’t get it to stop at sunrise
 
alias: Motion @ night
description: Turn dimmed hall lights on when motion detected @ night
trigger:
- type: motion
platform: device
device_id: 818546953f4583a966e13c6afdc86ff4
entity_id: binary_sensor.hall_sensor_occupancy
domain: binary_sensor
condition:
- condition: sun
after: sunset
after_offset: "-30:00"
action:
- service: light.turn_on
data:
transition: 12
brightness_pct: 11
target:
entity_id: light.hall
mode: single

this is as close as I can get
 
alias: Motion @ night
description: Turn dimmed hall lights on when motion detected @ night
trigger:
- type: motion
platform: device
device_id: 818546953f4583a966e13c6afdc86ff4
entity_id: binary_sensor.hall_sensor_occupancy
domain: binary_sensor
condition:
- condition: sun
after: sunset
after_offset: "-30:00"
action:
- service: light.turn_on
data:
transition: 12
brightness_pct: 11
target:
entity_id: light.hall
mode: single

this is as close as I can get

Sorry, not sure I'm following - just use the gui to select condition > sun > then set after sunset and before sunrise?

This means that your automation will only trigger between these conditions (ie at night)
 
Last edited:
alias: Motion @ night
description: Turn dimmed hall lights on when motion detected @ night
trigger:
- type: motion
platform: device
device_id: 818546953f4583a966e13c6afdc86ff4
entity_id: binary_sensor.hall_sensor_occupancy
domain: binary_sensor
condition:
- condition: sun
after: sunset
after_offset: "-30:00"
action:
- service: light.turn_on
data:
transition: 12
brightness_pct: 11
target:
entity_id: light.hall
mode: single

this is as close as I can get
Add condition before: sunrise
 
Sorry, not sure I'm following - just use the gui to select condition > sun > then set after sunset and before sunrise?

This means that your automation will only trigger between these conditions (ie at night)
Hi I have tried this but upon reading up the sun condition changes at midnight so it doesn’t seem to work
 
Last edited:
sorry dont know what one you want
https://imgur.com/a/ifvRkBs
Thanks, that's helpful - first question, can you try taking out the sunset condition and confirm the lights work without it?

Quite often it's the motion sensors with various different entity_ids that cause the problem (ie picking the right state monitor)

Also a quick check is to click the three buttons to the right of the condition at the right time (eg this evening) and click 'test' - it should tell you if the condition was passed or failed (sometimes it's just people testing at the wrong point or offsets being misunderstood)
 
Last edited:
Sorry edited it as it was running whenever I passed, I now have this and it runs fine for 1 minute when tested.still runs when motion is detected with sun conditions disabled
alias: Hall @ night
description: Turn dimmed hall light on after dark when motion detected
trigger:
- type: motion
platform: device
device_id: 818546953f4583a966e13c6afdc86ff4
entity_id: binary_sensor.hall_sensor_occupancy
domain: binary_sensor
for:
hours: 0
minutes: 0
seconds: 0
condition:
- condition: sun
before: sunset
before_offset: "-00:30:00"
after: sunrise
action:
- service: light.turn_on
data:
brightness_pct: 17
target:
entity_id: light.hall
- delay:
hours: 0
minutes: 1
seconds: 0
milliseconds: 0
- service: light.turn_off
data: {}
target:
entity_id: light.hall
mode: single
 
Last edited:
Sorry edited it as it was running whenever I passed, I now have this and it runs fine for 1 minute when tested.still runs when motion is detected with sun conditions disabled
alias: Hall @ night
description: Turn dimmed hall light on after dark when motion detected
trigger:
- type: motion
platform: device
device_id: 818546953f4583a966e13c6afdc86ff4
entity_id: binary_sensor.hall_sensor_occupancy
domain: binary_sensor
for:
hours: 0
minutes: 0
seconds: 0
condition:
- condition: sun
before: sunset
before_offset: "-00:30:00"
after: sunrise
action:
- service: light.turn_on
data:
brightness_pct: 17
target:
entity_id: light.hall
- delay:
hours: 0
minutes: 1
seconds: 0
milliseconds: 0
- service: light.turn_off
data: {}
target:
entity_id: light.hall
mode: single
Stupid question, is it not the opposite you want?

ie Would this not trigger after sunrise and before sunset (ie during the day).

For night time triggering, would you not want it after sunset and before sunrise (ie the night time)
 
Last edited:
alias: Hall @ night
description: Turn dimmed hall light on after dark when motion detected
trigger:
- type: motion
platform: device
device_id: 818546953f4583a966e13c6afdc86ff4
entity_id: binary_sensor.hall_sensor_occupancy
domain: binary_sensor
for:
hours: 0
minutes: 0
seconds: 0
condition:
- condition: sun
before: sunset
before_offset: "-00:30:00"
after: sunrise
enabled: false
action:
- service: light.turn_on
data:
brightness_pct: 17
target:
entity_id: light.hall
- delay:
hours: 0
minutes: 1
seconds: 0
milliseconds: 0
- service: light.turn_off
data: {}
target:
entity_id: light.hall
mode: single
Stupid question, is it not the opposite you want?

ie Would this not trigger after sunrise and before sunset (ie during the day).

For night time triggering, would you not want it after sunset and before sunrise (ie the night time)
when I look at it it looks like 30 mins before sunset till sunrise, totally lost, back to using HK automation for tonight, so easy lol
 
Back
Top Bottom