erikm
March 8, 2024, 4:45pm
148
Yes, will be fixed in 2024.3.1. See SNMP device tracker broken in 2024.3.0 and Python 3.12 · Issue #112548 · home-assistant/core · GitHub for more information and a workaround when you use hass-core in a Python virtualenv.
2 Likes
Yeah, tried that out and worked like a charm. I actually discovered that my script hadn’t been assigned a random id number but was using my original entity id when I first wrote script months ago. I had forgotten I renamed it, and the renaming process must have failed.
I also found a couple other scripts that were assigned with random numbers and explains why they have given me grief before.
Do you have details on how to replicate vertical-stack-in-card with card-mod?
mattius
(Matt Inglis)
March 8, 2024, 5:27pm
151
Has something changed with regards to casting dashboards in this release?
Since updating the release when casting a dashboard from an automation i just get the home assistant - connected display.
I can cast a dashboard fine from the UI, it just seems calling it from an automation is broken.
Cougar
(Cougar)
March 8, 2024, 6:03pm
152
A new energy graph is very cool! It would be even cooler to get cost graphs next
It would be so helpful for any kind of optimizations in case of multiple or changing tariffs. In our energy market very cheap price often means surplus production and more consumption helps to keep grid stable. Optimizing only for kWh consumption is a way wrong for the whole system.
Many users here have quite smart setups for car charges, heating and water boiler automation and so on based on energy price but HA still miss good built-in overview to visualize the final cost/saving.
2 Likes
Sure, what do you want to know.
There are many examples in this community so maybe check those? Card-mod thread holds many.
Probably mainly how to get rid of the stack-gap and how to delete box-shadow and widen margins.
That’s about it, here’s an example
1 Like
jb1677
(Jason)
March 8, 2024, 7:27pm
154
Is it possible to set the number of columns in a section? I see in the yaml its a grid but even with columns set to 3 or 4 it seems each section is still 2 columns max for me using buttons or vertical tiles. Surely I am missing something?
ski522
(ski522)
March 8, 2024, 9:01pm
156
pgdg71
March 8, 2024, 9:02pm
157
Cast problem for me too, Google hub stuck with Nabu Casa “connected” image with the latest version of home assistant.
1 Like
mattius
(Matt Inglis)
March 8, 2024, 9:14pm
158
I downgraded to the last Stable version, and it all started working again.
So there is definitley something funny going on in this release with casting. I notice in the detailed release notes there are some changes to cast. Guessing one of these broke it.
Shame i was looking forward to this release
use
type: horizontal-stack
cards:
… And some card-mod
type: tile
entity: binary_sensor.asusr_wan
hold_action:
action: more-info
hide_state: true
name: []
icon_color: orange
card_mod:
style:
ha-tile-icon$: |
.shape {
border-radius: 10px !important;
height: 50px !important;
width: 50px !important;
margin-top: 10px !important;
margin-bottom: 5px !important;
margin-left: -5px;
margin-right: -5px;
}
.: |
ha-card: {
height: 50px;
width: 40px;
}
:host {
height: 50px;
width: 40px;
margin-left: 10px;
}
Another example ( I dont use )
So i don’t paste the whole code, i guess you can count
type: tile
entity: binary_sensor.ds2_door
hold_action:
action: more-info
hide_state: true
name: []
icon_color: orange
card_mod:
style:
ha-tile-icon$: |
.shape {
border-radius: 10px !important;
height: 40px !important;
width: 30px !important;
margin-top: 10px !important;
margin-bottom: 5px !important;
margin-left: -5px;
margin-right: -5px;
}
.: |
ha-card: {
height: 40px;
width: 40px;
}
mattius
(Matt Inglis)
March 8, 2024, 9:48pm
161
2024.2.4 works again if you downgrade.
Raised an issue on GitHub for it
wmaker
(Tommy Long)
March 8, 2024, 10:27pm
162
Possibly…what is at_date
? That may be what its complaining about.
jprates
(João Prates)
March 8, 2024, 11:41pm
163
Thanks for looking into this.
at_date
is part of the suntime module, so it’s internal to python, not mine.
I’ve got a confirmation at stack overflow that this is a bug introduced into python 3 days ago. A bug report has been submitted already, so I’ll just wait for it to be solved in the next release.
pete.AUS
(Pete)
March 9, 2024, 3:03am
164
Python is broken for many, for me it was modbus, for others they are in the comments here. I raised a bug report to the modbus dev
opened 02:47AM - 09 Mar 24 UTC
integration: modbus
### The problem
After updating to 2024.2.5 there are various python errors with… the modbus intergration
My automation is sending modbus write registers to 2 solar inverters and both are failing after 2024.2.5
I can confirm after downgrading to 2024.2.4 the automations now work
### What version of Home Assistant Core has the issue?
2024.2.5
### What was the last working version of Home Assistant Core?
2024.2.4
### What type of installation are you running?
Home Assistant OS
### Integration causing the issue
Modbus
### Link to integration documentation on our website
https://www.home-assistant.io/integrations/modbus/
### Diagnostics information
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/automation/__init__.py", line 666, in async_trigger
return await self.action_script.async_run(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 1600, in async_run
return await asyncio.shield(run.async_run())
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 435, in async_run
await self._async_step(log_exceptions=False)
File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 487, in _async_step
self._handle_exception(
File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 512, in _handle_exception
raise exception
File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 485, in _async_step
await getattr(self, handler)()
File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 723, in _async_call_service_step
response_data = await self._async_run_long_action(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 685, in _async_run_long_action
return long_task.result()
^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/core.py", line 2319, in async_call
response_data = await coro
^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/core.py", line 2356, in _execute_service
return await target(service_call)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/modbus/modbus.py", line 184, in async_write_register
await hub.async_pb_call(
File "/usr/src/homeassistant/homeassistant/components/modbus/modbus.py", line 485, in async_pb_call
result = await self.hass.async_add_executor_job(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/modbus/modbus.py", line 448, in pb_call
result: ModbusResponse = entry.func(address, value, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/pymodbus/client/mixin.py", line 150, in write_register
return self.execute(
^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/pymodbus/client/base.py", line 407, in execute
if not self.connect():
^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/pymodbus/client/tcp.py", line 166, in connect
self.socket = socket.create_connection(
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/socket.py", line 834, in create_connection
sock.settimeout(timeout)
ValueError: Timeout value out of range
### Example YAML snippet
```yaml
alias: 3.3 Dynamic Inverter Power - Custom Intergration - Gen24
description: Negtive FIT solar will match consumption of house and battery
trigger:
- platform: time_pattern
enabled: false
seconds: /2
- platform: state
entity_id:
- sensor.v5_scaled_power_custom_intergration
enabled: true
condition:
- condition: state
entity_id: binary_sensor.amber_grid_price_negative
state: "off"
- condition: state
entity_id: sun.sun
state: above_horizon
- condition: state
entity_id: binary_sensor.amber_feedin_price_negative
state: "on"
enabled: true
- condition: time
after: "09:30:00"
enabled: true
- condition: state
entity_id: binary_sensor.tesla_wall_connector_contactor_closed
state: "off"
enabled: true
- condition: or
conditions:
- condition: state
entity_id: binary_sensor.amber_feedin_price_negative
state: "on"
- condition: state
entity_id: binary_sensor.daily_export_limit_reached
state: "on"
enabled: true
enabled: false
- condition: state
entity_id: input_boolean.new_solar_logic
state: "on"
action:
- alias: Set scaling factor 0-10000 being max
service: modbus.write_register
data:
hub: MBFronius_Gen24
address: 40232
slave: 1
value: "{{ states('sensor.v5_scaled_power_custom_intergration') | int }}"
- service: modbus.write_register
data:
address: 40233
unit: 1
value: 0
hub: MBFronius_Gen24
alias: Move to new power factor immediately
- service: modbus.write_register
data:
address: 40234
unit: 1
value: 0
hub: MBFronius_Gen24
alias: Set revert time to 0 - Stay at set power
- service: modbus.write_register
data:
address: 40235
unit: 1
value: 0
hub: MBFronius_Gen24
alias: Move to new power setpoint immediately
- service: modbus.write_register
data:
address: 40236
unit: 1
value: 1
hub: MBFronius_Gen24
alias: Enable throttle control - required for command to work
- service: modbus.write_register
data:
address: 40237
unit: 1
value: 1
hub: MBFronius_Gen24
enabled: false
mode: single
```
### Anything in the logs that might be useful for us?
```txt
Modbus connections definded in my configuration.yaml
modbus:
- type: tcp
host: 192.168.1.143
port: 502
name: "MBFronius_Primo"
timeout: 5
- type: tcp
host: 192.168.1.231
port: 502
name: "MBFronius_Gen24"
timeout: 5
Referenced sensor in the automation (which does have values ranging from 1 - 10000
v5_scaled_power_custom_intergration:
friendly_name: "Inverter Scaled Power V5 Custom Integration"
value_template: "{{ ((states('sensor.house_power_value_divided_by_2_max5200_v4_custom_integration') | float) * 10000 / 5000) | round(0, 'floor') }}"
```
### Additional information
as mentioned downgrading to 2024.2.4 fixes this issue
1 Like
pete.AUS
(Pete)
March 9, 2024, 3:04am
165
Yes Python is not working its causing the modbus core intergration to not work
opened 02:47AM - 09 Mar 24 UTC
integration: modbus
### The problem
After updating to 2024.2.5 there are various python errors with… the modbus intergration
My automation is sending modbus write registers to 2 solar inverters and both are failing after 2024.2.5
I can confirm after downgrading to 2024.2.4 the automations now work
### What version of Home Assistant Core has the issue?
2024.2.5
### What was the last working version of Home Assistant Core?
2024.2.4
### What type of installation are you running?
Home Assistant OS
### Integration causing the issue
Modbus
### Link to integration documentation on our website
https://www.home-assistant.io/integrations/modbus/
### Diagnostics information
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/automation/__init__.py", line 666, in async_trigger
return await self.action_script.async_run(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 1600, in async_run
return await asyncio.shield(run.async_run())
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 435, in async_run
await self._async_step(log_exceptions=False)
File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 487, in _async_step
self._handle_exception(
File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 512, in _handle_exception
raise exception
File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 485, in _async_step
await getattr(self, handler)()
File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 723, in _async_call_service_step
response_data = await self._async_run_long_action(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 685, in _async_run_long_action
return long_task.result()
^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/core.py", line 2319, in async_call
response_data = await coro
^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/core.py", line 2356, in _execute_service
return await target(service_call)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/modbus/modbus.py", line 184, in async_write_register
await hub.async_pb_call(
File "/usr/src/homeassistant/homeassistant/components/modbus/modbus.py", line 485, in async_pb_call
result = await self.hass.async_add_executor_job(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/modbus/modbus.py", line 448, in pb_call
result: ModbusResponse = entry.func(address, value, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/pymodbus/client/mixin.py", line 150, in write_register
return self.execute(
^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/pymodbus/client/base.py", line 407, in execute
if not self.connect():
^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/pymodbus/client/tcp.py", line 166, in connect
self.socket = socket.create_connection(
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/socket.py", line 834, in create_connection
sock.settimeout(timeout)
ValueError: Timeout value out of range
### Example YAML snippet
```yaml
alias: 3.3 Dynamic Inverter Power - Custom Intergration - Gen24
description: Negtive FIT solar will match consumption of house and battery
trigger:
- platform: time_pattern
enabled: false
seconds: /2
- platform: state
entity_id:
- sensor.v5_scaled_power_custom_intergration
enabled: true
condition:
- condition: state
entity_id: binary_sensor.amber_grid_price_negative
state: "off"
- condition: state
entity_id: sun.sun
state: above_horizon
- condition: state
entity_id: binary_sensor.amber_feedin_price_negative
state: "on"
enabled: true
- condition: time
after: "09:30:00"
enabled: true
- condition: state
entity_id: binary_sensor.tesla_wall_connector_contactor_closed
state: "off"
enabled: true
- condition: or
conditions:
- condition: state
entity_id: binary_sensor.amber_feedin_price_negative
state: "on"
- condition: state
entity_id: binary_sensor.daily_export_limit_reached
state: "on"
enabled: true
enabled: false
- condition: state
entity_id: input_boolean.new_solar_logic
state: "on"
action:
- alias: Set scaling factor 0-10000 being max
service: modbus.write_register
data:
hub: MBFronius_Gen24
address: 40232
slave: 1
value: "{{ states('sensor.v5_scaled_power_custom_intergration') | int }}"
- service: modbus.write_register
data:
address: 40233
unit: 1
value: 0
hub: MBFronius_Gen24
alias: Move to new power factor immediately
- service: modbus.write_register
data:
address: 40234
unit: 1
value: 0
hub: MBFronius_Gen24
alias: Set revert time to 0 - Stay at set power
- service: modbus.write_register
data:
address: 40235
unit: 1
value: 0
hub: MBFronius_Gen24
alias: Move to new power setpoint immediately
- service: modbus.write_register
data:
address: 40236
unit: 1
value: 1
hub: MBFronius_Gen24
alias: Enable throttle control - required for command to work
- service: modbus.write_register
data:
address: 40237
unit: 1
value: 1
hub: MBFronius_Gen24
enabled: false
mode: single
```
### Anything in the logs that might be useful for us?
```txt
Modbus connections definded in my configuration.yaml
modbus:
- type: tcp
host: 192.168.1.143
port: 502
name: "MBFronius_Primo"
timeout: 5
- type: tcp
host: 192.168.1.231
port: 502
name: "MBFronius_Gen24"
timeout: 5
Referenced sensor in the automation (which does have values ranging from 1 - 10000
v5_scaled_power_custom_intergration:
friendly_name: "Inverter Scaled Power V5 Custom Integration"
value_template: "{{ ((states('sensor.house_power_value_divided_by_2_max5200_v4_custom_integration') | float) * 10000 / 5000) | round(0, 'floor') }}"
```
### Additional information
as mentioned downgrading to 2024.2.4 fixes this issue
OzGav
(Oz Gav)
March 9, 2024, 3:13am
166
Yes I just noticed the same thing. Different timezone though
pete.AUS
(Pete)
March 9, 2024, 7:10am
167
Check your logs. Seems to be a massive issue with the Python library
1 Like
pete.AUS
(Pete)
March 9, 2024, 7:14am
168
Heaps is errors in the Python libraries. Seems a few integrations are broken. Had to roll back