georgezhao2010 / midea_ac_lan

Auto-configure and then control your Midea M-Smart devices (Air conditioner, Fan, Water heater, Washer, etc) via local area network.
MIT License
1.24k stars 194 forks source link

Cannot access on climate entities throght template or python script #554

Open Rihan9 opened 4 days ago

Rihan9 commented 4 days ago

HA core version

2024.6.4

Intergration version

v0.3.22

Device type and model

Air Conditioner 00000Q1B (0)

Used App

Carrier air conditioner

The description of problem

Hi, to prevent an automation to turn on and off the climate continuously, I need to access the last_changed attribute throght this:

states.climate.153931628036068_climate.last_changed

but neiter in template nor in python script the command works. I got the following error: expected token 'end of print statement', got '_climate'

I tried the same command with a generic light and works. Can you please help me?

Thanks and Regards

The logs

No response

rokam commented 15 hours ago

https://github.com/wuwentao/midea_ac_lan/