-
Notifications
You must be signed in to change notification settings - Fork 37
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
media_player doesn't send off IR command if entity is off but TV is on #156
Comments
I can confirm that in 1.17.14, this behavior is not present. The media_player works as I described in the Expected field. |
The issue is present after 1.17.15 |
Hello, can you please check, if the ON and OFF code are different or same? |
In this case yes, the repo has discrete on and off commands |
Yep, I can confirm this bug. The proposed correction is to sent always ON or OFF command except the case, when ON and OFF codes are same - then the current functionality will be kept. |
I would suggest always send the command, independly of the state of the entity because the entity state doesn't have a direct relation to the real tv state. (This is the exact way Tuya impleents it's fantastic IR service) Imagine this situation:
The only case in which this makes sense is if both codes are equal AND the feature of power_sensor is enabled (entity attributed to it) |
While I understand you explanation, the feature to prevent sending again ON/OFF commands was implemented based on #70 and you can read very good reasoning behind it as well. So if we will not come with some smart idea how to accommodate both cases..... |
Okay, good point, but... Make it configurable! |
Good point. Even I am not much of a fan of inflating configuration to include options for every single use case, this one is probably deserved. To keep backward compatibility, by default this option would be set to false. It will be only used in case when the power sensor is not used. I think then similar change needs to be implemented in all classes across SmartIR. |
I'm having a issue with the debug logs and will update this post with relevant logs and yaml shortly
Home Assistant version
2024.11.2
SmartIR version
1.19.0
SmartIR configuration
Describe the bug
AFTER 1.17.15, if the TV is ON but the TV media player entity is OFF (turned on via real remote). HA wont turn TV off using the media_player.turn_off service. The IR command is not sent
If I turn the entity ON, then OFF, the OFF IR command will be sent.
(either via UI or service)
Expected behavior
To HA always send the IR turn off command independently to the entity state (climate entity works exactly like that!)
(works this way before 1.17.15)
To Reproduce
Debug log
(it's the only log related to smartir i see after reproducing the bug)
2024-11-23 17:52:58.030 DEBUG (MainThread) [custom_components.smartir.media_player] Setting up the SmartIR media player platform
Additional context
I want to reinforce that the climate entity works exactly in the way described in Expected field. I was using the "official" SmartIR integration and never encountered this issue. I'm currently reinstalling it to check and will update this post with the information
The text was updated successfully, but these errors were encountered: