Geekzone: technology news, blogs, forums
Guest
Welcome Guest.
You haven't logged in yet. If you don't have an account you can register now.


shim99

104 posts

Master Geek

ID Verified

#306581 5-Aug-2023 11:33
Send private message

Hey, 

 

Looking for some help with an automation in homeassistant. We have a tesla that is able to charge at 16a but I would like to reduce that charge to 10a if the outside hotwater is also on. The hotwater is controlled by a shelly1 and we have the Tesla integration in homeassistant. I'm having trouble with the automation and wondering if anyone has pointers. What I have so far is:

 

 

 

alias: Reduce Amps Tesla
description: Reduces charge when outside hot water on
trigger:
  - type: charging
    platform: device
    device_id: XXXX
    entity_id: binary_sensor.pierre_charging
    domain: binary_sensor
    for:
      hours: 0
      minutes: 0
      seconds: 5
condition:
  - condition: device
    type: is_on
    device_id: YYYY
    entity_id: switch.outside_hot_water
    domain: switch
    for:
      hours: 0
      minutes: 0
      seconds: 2
action:
  - condition: state
    entity_id: number.pierre_charging_amps
    attribute: "10"
    state: ""
mode: single

 

I guess it could be that I need to set numeric state but not sure how the minimum and maximum works alongside the value template. 

 

Any help greatly appreciated. 

 

Thx. 


Create new topic
DataBitz
37 posts

Geek


  #3117967 19-Aug-2023 14:06
Send private message

What does the trace look like?
Which step are you having trouble with?

 

I have something similar but with the condition action that the Tesla is charging.
Also I set the charging amp via the device action, I think that's what you need to change.

 

You may also want to add a condition to the automation, that the Tesla is at Home. So if your charging away from home the rate isn't changed.

 

  - if:
      - condition: state
        entity_id: binary_sensor.tesla_charging
        state: "on"
    then:
      - device_id: xxxxxxxxxxxxxx
        domain: number
        entity_id: number.tesla_charging_amps
        type: set_value
        value: 8
    else: []




shim99

104 posts

Master Geek

ID Verified

  #3117971 19-Aug-2023 14:58
Send private message

That was really helpful guidance thanks, i've relooked at it and done a similar if/then/else statement that uses the status of the hot water. I've still done it as a time based trigger and it seems to be working well. 

 

alias: Reduce Amps Tesla
description: Reduces charge when outside hot water on
trigger:
  - platform: time
    at: "22:58:00"
condition: []
action:
  - if:
      - condition: state
        entity_id: switch.outside_hot_water
        state: "on"
    then:
      - device_id: XXXX
        domain: number
        entity_id: number.pierre_charging_amps
        type: set_value
        value: 8
    else:
      - device_id: YYYY
        domain: number
        entity_id: number.pierre_charging_amps
        type: set_value
        value: 16
mode: single

 

 


DataBitz
37 posts

Geek


  #3117999 19-Aug-2023 17:21
Send private message

You should be able to use this trigger, so it starts when the switch is turned on.
Make sure your Shelly is set up to send events to Home Assistant (See Shelly CoIoT settings) though to help ensure it sees the state change quickly.

 

trigger:
  - platform: state
    entity_id:
      - switch.outside_hot_water
    to: "on"




shim99

104 posts

Master Geek

ID Verified

  #3118017 19-Aug-2023 19:10
Send private message

Thanks, the problem i have is that the feed to the switchboard that the charger, hotwater, laundry and powerpoints is on is only 25a. This is a garage circuit and I only turn the hotwater on when we have guests. So if I wait for the hotwater to come on there is a risk it blows the circuit (if hotwater, heater and dryer is going) before home assistant can step down the amps to the tesla. Under the current setup, I switch the hotwater on at 11pm and home assistant checks whether thats on and if so it will turn the charging down for the Tesla for the night (Tesla charging starts at 11.05pm). It will recheck again the next day. 

 

Again appreciate the help.


Create new topic





News and reviews »

Air New Zealand Starts AI adoption with OpenAI
Posted 24-Jul-2025 16:00


eero Pro 7 Review
Posted 23-Jul-2025 12:07


BeeStation Plus Review
Posted 21-Jul-2025 14:21


eero Unveils New Wi-Fi 7 Products in New Zealand
Posted 21-Jul-2025 00:01


WiZ Introduces HDMI Sync Box and other Light Devices
Posted 20-Jul-2025 17:32


RedShield Enhances DDoS and Bot Attack Protection
Posted 20-Jul-2025 17:26


Seagate Ships 30TB Drives
Posted 17-Jul-2025 11:24


Oclean AirPump A10 Water Flosser Review
Posted 13-Jul-2025 11:05


Samsung Galaxy Z Fold7: Raising the Bar for Smartphones
Posted 10-Jul-2025 02:01


Samsung Galaxy Z Flip7 Brings New Edge-To-Edge FlexWindow
Posted 10-Jul-2025 02:01


Epson Launches New AM-C550Z WorkForce Enterprise printer
Posted 9-Jul-2025 18:22


Samsung Releases Smart Monitor M9
Posted 9-Jul-2025 17:46


Nearly Half of Older Kiwis Still Write their Passwords on Paper
Posted 9-Jul-2025 08:42


D-Link 4G+ Cat6 Wi-Fi 6 DWR-933M Mobile Hotspot Review
Posted 1-Jul-2025 11:34


Oppo A5 Series Launches With New Levels of Durability
Posted 30-Jun-2025 10:15









Geekzone Live »

Try automatic live updates from Geekzone directly in your browser, without refreshing the page, with Geekzone Live now.



Are you subscribed to our RSS feed? You can download the latest headlines and summaries from our stories directly to your computer or smartphone by using a feed reader.