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

rrh

Expert Member
Joined
Nov 29, 2005
Messages
4,031
Ive been try to get this working last week and I gave up at one point. I have no idea how to do step 1 and 3.

I tried step 2 but I dont think its done correctly. If I google something like "dishwasher", Ill get some shopping ads at the top of the results, but if I click on it then it gives an error ( I think some dns error). Is that meant to happen with adguard or was there meant to be no ads at all?

EDIT: I should also mention im using duckdns to access my Pi from outside my network.
Google ads access a Google analytics website (e.g. www.googleadservices.com) before going to the clicked-on website. It is this website that is blocked,

If you are happy with the access simply whitelist the analytics website.
 

MidnightZA

Expert Member
Joined
Mar 9, 2013
Messages
2,060
1636640038798.png

The is the power reading from my Geyser switch (the CBI one), yesterday something strange happened before/after load shedding. I have no idea why or how. It kept the a reading of 1500W from 7pm last night till the geyser went on now at 4pm. Now it says my daily usage for yesterday is 32kwh. The tuya app shows the correct kwh used.

Is there a way to resync the history or edit the history to get rid of that 1500W line?
 

xrapidx

Honorary Master
Joined
Feb 16, 2007
Messages
39,583
View attachment 1189638

The is the power reading from my Geyser switch (the CBI one), yesterday something strange happened before/after load shedding. I have no idea why or how. It kept the a reading of 1500W from 7pm last night till the geyser went on now at 4pm. Now it says my daily usage for yesterday is 32kwh. The tuya app shows the correct kwh used.

Is there a way to resync the history or edit the history to get rid of that 1500W line?
You can, but it depends on what db you're using, mine is in MySQL.

I used to cleanup it up, but gave up, too many little anomalies with loadshedding and constant service restarts due to code changes.
 

Tinuva

The Magician
Joined
Feb 10, 2005
Messages
11,340
View attachment 1189638

The is the power reading from my Geyser switch (the CBI one), yesterday something strange happened before/after load shedding. I have no idea why or how. It kept the a reading of 1500W from 7pm last night till the geyser went on now at 4pm. Now it says my daily usage for yesterday is 32kwh. The tuya app shows the correct kwh used.

Is there a way to resync the history or edit the history to get rid of that 1500W line?
Typical issue I also have with these. I am soon ready to replace their chips with esp12f so that I can use tasmota and get rid of these annoyances.
 

MidnightZA

Expert Member
Joined
Mar 9, 2013
Messages
2,060
You can, but it depends on what db you're using, mine is in MySQL.

I used to cleanup it up, but gave up, too many little anomalies with loadshedding and constant service restarts due to code changes.
I'm using mariadb. Is it possible to edit that one?
Typical issue I also have with these. I am soon ready to replace their chips with esp12f so that I can use tasmota and get rid of these annoyances.
I wish I had the skills to do that. I think my geyser is the only thing that's cloud linked.
 

Tinuva

The Magician
Joined
Feb 10, 2005
Messages
11,340
I'm using mariadb. Is it possible to edit that one?

I wish I had the skills to do that. I think my geyser is the only thing that's cloud linked.
I will be honest, I don't have the skills

It is an experiment waiting for me to try in December holidays.

I also want to do a bunch of bneta plugs that now has the new non flashable chips.

Fun times ahead.
 

xrapidx

Honorary Master
Joined
Feb 16, 2007
Messages
39,583
I'm using mariadb. Is it possible to edit that one?

I wish I had the skills to do that. I think my geyser is the only thing that's cloud linked.
You should be able to access it with some sort of SQL client, and if you know SQL, clean up the records.

I use a rocker image of phpmyadmin
 

Mzezman

Senior Member
Joined
Nov 13, 2021
Messages
998
I've got some Tuya enabled Aircons and using the new v2 integration I was able to seamlessly integrate them into HA. Now the standard thermostat card that was used does not show some functionality that is available on the aircon, e.g. I am unable to change the fan speed, set it to night mode (switches off led) etc.



This functionality is available on the Smart home / Tuya app and in the Tiya IoT platform the functions are there, I can send a command from the IoT platform and the aurcon responds with the right mode.



How can I get these extra functions into Home Assistant? Screenshot_20211114-131509_Home%20Assistant.jpg Screenshot_20211114-131621_Smart%20Life.jpg
 

Leno

Expert Member
Joined
May 15, 2005
Messages
2,336
Howdy

This week I decided to venture into Home Assistant

I only have Sonoff B05 wifi led bulbs, ewelink (unfortunately I had already bought them before finding home assistant and checking compatibility, and they are not tasmoto compatible)
The reason I started was sonoff adding the home assistant plugin for ewelink

I have basically setup scenes as "presents" for the bulbs

eg

- name: day
entities:
light.1:
state: 'on'
color_mode: 'color_temp'
brightness: 254
color_temp: 1
light.2:
state: 'on'
color_mode: 'color_temp'
brightness: 254
color_temp: 1
- name: day warm
entities:
light.1:
state: 'on'
color_mode: 'color_temp'
color_temp: 255
light.2:
state: 'on'
color_mode: 'color_temp'
color_temp: 255
- name: evening
entities:
light.1:
state: 'on'
color_mode: 'rgb'
rgb_color:
- 255
- 64
- 0
light.2:
state: 'on'
color_mode: 'rgb'
rgb_color:
- 255
- 64
- 0

The problem I have is often I have to run the scene twice to get the desired result
Other times the bulb changes , then a second later it returns back to the old setting

I also seem to have to set the brightness in a seperate scene to the color

Does anyone with rgb led's have to do this also, or is it an ewelink thing

I suspect maybe with ewelink that I can only set one thing per scene,
perhaps I should use a script which includes a pause between instructions?
 

furpile

Expert Member
Joined
Jul 14, 2014
Messages
3,808
Howdy

This week I decided to venture into Home Assistant

I only have Sonoff B05 wifi led bulbs, ewelink (unfortunately I had already bought them before finding home assistant and checking compatibility, and they are not tasmoto compatible)
The reason I started was sonoff adding the home assistant plugin for ewelink

I have basically setup scenes as "presents" for the bulbs

eg



The problem I have is often I have to run the scene twice to get the desired result
Other times the bulb changes , then a second later it returns back to the old setting

I also seem to have to set the brightness in a seperate scene to the color

Does anyone with rgb led's have to do this also, or is it an ewelink thing

I suspect maybe with ewelink that I can only set one thing per scene,
perhaps I should use a script which includes a pause between instructions?
I don't have any bulbs, but I started with the SonoffLAN integration, which was made long before the official Sonoff integration (which is very poor from what I have seen). Maybe try using the SonoffLAN integration, which allows you to use the Sonoff products offline? You can check if your bulbs are supported first, I don't see them listed though. Some of the other bulbs listed needs the cloud to operate.
 

MidnightZA

Expert Member
Joined
Mar 9, 2013
Messages
2,060
Howdy

This week I decided to venture into Home Assistant

I only have Sonoff B05 wifi led bulbs, ewelink (unfortunately I had already bought them before finding home assistant and checking compatibility, and they are not tasmoto compatible)
The reason I started was sonoff adding the home assistant plugin for ewelink

I have basically setup scenes as "presents" for the bulbs

eg



The problem I have is often I have to run the scene twice to get the desired result
Other times the bulb changes , then a second later it returns back to the old setting

I also seem to have to set the brightness in a seperate scene to the color

Does anyone with rgb led's have to do this also, or is it an ewelink thing

I suspect maybe with ewelink that I can only set one thing per scene,
perhaps I should use a script which includes a pause between instructions?

I have the Sonoff Strip Light and I have a similar issue. I cant set the automation to turn on and set the colour in 1 line

I just set up my automation with 2 actions. First to turn the light on, then to the colour I want, theres no delay set so its instant.

YAML:
alias: Stairs (Turn On)
description: Motion Sensor Control for Staircase
trigger:
  - platform: state
    entity_id: binary_sensor.motion_sensor_1_ias_zone
    from: 'off'
    to: 'on'
condition:
  - condition: state
    entity_id: light.sonoff_1001134f90
    state: 'off'
action:
  - service: light.turn_on
    target:
      entity_id: light.sonoff_1001134f90
    data:
      color_name: cyan
  - service: light.turn_on
    target:
      entity_id: light.sonoff_1001134f90
mode: single
 

Leno

Expert Member
Joined
May 15, 2005
Messages
2,336
alias: Stairs (Turn On) description: Motion Sensor Control for Staircase trigger: - platform: state entity_id: binary_sensor.motion_sensor_1_ias_zone from: 'off' to: 'on' condition: - condition: state entity_id: light.sonoff_1001134f90 state: 'off' action: - service: light.turn_on target: entity_id: light.sonoff_1001134f90 data: color_name: cyan - service: light.turn_on target: entity_id: light.sonoff_1001134f90 mode: single

Your nudge in the right direction helped!


scene
YAML:
- name: joe1 on
  entities:
    light.10010aea28:
      state: 'on'
- name: joe1 day
  entities:
    light.10010aea28:
      state: 'on'
      color_mode: 'color_temp'
      color_temp: 1

script
YAML:
joeday:
  alias: joeday
  sequence:
  - scene: scene.joe1_on
  - delay:
      seconds: 1
  - scene: scene.joe1_day
  - delay:
      seconds: 1
  - scene: scene.joe2_on
  - delay:
      seconds: 1
  - scene: scene.joe2_day
  - delay:
      seconds: 1
  mode: single
 

Leno

Expert Member
Joined
May 15, 2005
Messages
2,336
Found another bug with sonoff ewelink

Setting brightness with "brightness" will not always work, sets it but it returns to original setting
My theory is maybe the ewelink app uses brightness_pct which keeps overriding Home Assistant

"brightness_pct" (percent) seems to work better

I only stumbled on this setting via the developer tools -> services
brightness_pct does not show in the states under developer tools

YAML:
joedaywarmdim:
  alias: joedaywarmdim
  sequence:
  - service: light.turn_on
    data:
      entity_id: light.10010aea28
      brightness_pct: 10
  - delay:
      seconds: 1
  mode: single
 

Mzezman

Senior Member
Joined
Nov 13, 2021
Messages
998
I've got some Tuya enabled Aircons and using the new v2 integration I was able to seamlessly integrate them into HA. Now the standard thermostat card that was used does not show some functionality that is available on the aircon, e.g. I am unable to change the fan speed, set it to night mode (switches off led) etc.



This functionality is available on the Smart home / Tuya app and in the Tiya IoT platform the functions are there, I can send a command from the IoT platform and the aurcon responds with the right mode.



How can I get these extra functions into Home Assistant? View attachment 1192292 View attachment 1192294
bump - anyone?
 

Mzezman

Senior Member
Joined
Nov 13, 2021
Messages
998
Is that first screenshot from your own HA?

If not, try downloading the tuya integration.
else, go to the device page and show what data you are getting from the aircon.
Yes the first screen is the Climate card that is in HA connecting to the Aircon via Tuya v2

Device page
1636989575836.png

Developer page
1636989605386.png

The climate entity has these modes availabe:
1636989901335.png

1636989938643.png

If i send a command from the Tuya Iot portal the device reacts as anticipated:

1636990548585.png
 
Last edited:

ItherNiT

Senior Member
Joined
Jan 31, 2011
Messages
822
Yes the first screen is the Climate card that is in HA connecting to the Aircon via Tuya v2

Device page
View attachment 1193342

Developer page
View attachment 1193344

The climate entity has these modes availabe:
View attachment 1193348

View attachment 1193350

If i send a command from the Tuya Iot portal the device reacts as anticipated:

View attachment 1193362
Looks like its a known issue at the moment: https://community.home-assistant.io/t/problems-with-tuya-climate-control/138664/3

Don't think I can assist you here...
 
Top