Home Assistant : Q&A, Tips & Tricks, Your Configs

@xrapidx had a good way. I couldnt make it work.

I just have this now:
View attachment 1067189
Thanks, currently I have this in grafana:
Code:
SELECT max("value") FROM "kWh" WHERE ("entity_id" = 'study_power_usage_daily') AND $timeFilter GROUP BY time(1d) fill(null)

I didn't set the relative time which made it look all funny. If I set it it looks better.
 
Is anyone able to provide a quick walk through on getting a CBI Astute into HA? At the moment it works via the CBI app - am I able to use this, or do I need to connect via another app

EDIT: successfully added it to the TuyaSmart app
EDIT2: This seems to be a good tutorial. I can't find my devices in the Tuya website, but it might be due to the 24-hour waiting period they mention
 
Last edited:
I'm trying to access the sensor values for the CBI Astute integration to HA (via local tuya). My configuration.yaml is below. What am I doing wrong?

- platform: template
sensors:
geyser_voltage::
value_template: >-
{{ states.switch.geyser.voltage }}
unit_of_measurement: "V"
geyser_current:
value_template: >-
{{ states.switch.geyser.current }}
unit_of_measurement: "mA"
geyser_consumption:
value_template: >-
{{ states.switch.geyser.current_consumption }}
unit_of_measurement: "W"
Screenshot 2021-05-13 at 08.41.57.png
EDIT: I was missing .attributes in the yaml. i.e. states.switch.geyser.attributes.voltage etc)
 
Last edited:
I'm trying to access the sensor values for the CBI Astute integration to HA (via local tuya). My configuration.yaml is below. What am I doing wrong?


View attachment 1067529
EDIT: I was missing .attributes in the yaml. i.e. states.switch.geyser.attributes.voltage etc)
This is mine:

But instead of the template sensors, like you did in sonoff local, the tuya local can technically create it for you as well.
 
I'm trying to access the sensor values for the CBI Astute integration to HA (via local tuya). My configuration.yaml is below. What am I doing wrong?


View attachment 1067529
EDIT: I was missing .attributes in the yaml. i.e. states.switch.geyser.attributes.voltage etc)
Just a small comment on how you are accessing entities and their attributes. It is advised at https://www.home-assistant.io/docs/configuration/templating/ that you rather use:
YAML:
{{ state_attr('switch.geyser', 'current') }}
Have a look at the warning under STATES.
 
Last edited:
Does anyone have a recommendation for a power sensor you can hook up to the mains to check the total comsumption of the house?

The efergy's looks nice as they just clip on.
 
Does anyone have a recommendation for a power sensor you can hook up to the mains to check the total comsumption of the house?

The efergy's looks nice as they just clip on.
I have an efergy classic. Note that you'll likely need the hub for web (and HA) access
 
I have an efergy classic. Note that you'll likely need the hub for web (and HA) access
Like this:

How many sensors can connect to a hub?
 
How can I get rid of this false Arm>Disarm>Arm notification on telegram? It happens very randomly. Yesterday morning it happened but today it didnt. It only happens when the Arm is activated by the arm automation when I leave the house (presence detection)

I was thinking it happens because both zones are arming at once and if I add a small delay between the interior arm and exterior arm automation then I wont get the Arm>Disarm>Arm notification?


1620893316995.png

YAML:
#ARMED AND DISARMED TO TELEGRAM BOT - INTERIOR
- alias: Alarm - Interior - Armed
  trigger:
  - platform: state
    entity_id: alarm_control_panel.indoor
    from: disarmed
    to:
    - armed_away
    - armed_home
  action:
  - service: [removed]
    data:
      title: Interior Alarm
      message: Armed
- alias: Alarm - Interior - Disarmed
  trigger:
  - platform: state
    entity_id: alarm_control_panel.indoor
    to: disarmed
  action:
  - service: [removed]
    data:
      title: Interior Alarm
      message: Disarmed

Code for exterior alarm is the same, just tweaked for the outdoor entity
 
How can I get rid of this false Arm>Disarm>Arm notification on telegram? It happens very randomly. Yesterday morning it happened but today it didnt. It only happens when the Arm is activated by the arm automation when I leave the house (presence detection)

I was thinking it happens because both zones are arming at once and if I add a small delay between the interior arm and exterior arm automation then I wont get the Arm>Disarm>Arm notification?


View attachment 1067575

YAML:
#ARMED AND DISARMED TO TELEGRAM BOT - INTERIOR
- alias: Alarm - Interior - Armed
  trigger:
  - platform: state
    entity_id: alarm_control_panel.indoor
    from: disarmed
    to:
    - armed_away
    - armed_home
  action:
  - service: [removed]
    data:
      title: Interior Alarm
      message: Armed
- alias: Alarm - Interior - Disarmed
  trigger:
  - platform: state
    entity_id: alarm_control_panel.indoor
    to: disarmed
  action:
  - service: [removed]
    data:
      title: Interior Alarm
      message: Disarmed

Code for exterior alarm is the same, just tweaked for the outdoor entity
Try:
Code:
trigger:
  - platform: state
    entity_id: alarm_control_panel.indoor
    to: disarmed
    for:
      seconds: 5
So only notify it it changed and stayed like that for at least 5 seconds. You can do it longer or shorter, depends on how many seconds between your armed->disarmed->armed. But basically it will only notify once if you do that for both the arm and disarmed triggers. The side effect is, the notification will be delayed by at least that long.
 
Top
Sign up to the MyBroadband newsletter
X