Kodi not updating states?

I Think i might have found a bug.

If i play a video on Kodi, it shows as playing, if I pause it, it shows paused.

When i un-pause it from HA (or anywhere else) the state still shows it a paused (even though it is playing) until i stop the video.

is there a way to force HA to poll Kodi and get the correct states?

The kodi integration doesn’t poll. It is a local push integration.

Have you tried “play” rather than “unpause”?

I have tried the play/pause button in the HA GUI, the play button on the Windows machine kodi is on, android remote.

Other information like the play position updates, HA just thinks it’s paused the whole time, if i stop the video, it goes back to “idle” instantly.

this should point you down the right track

  action:
  - data:
      entity_id: media_player.kodi_main
    service: media_player.media_play_pause

send it once its pause

send it again it plays

on my tv remote I have Play/Pause does nothing

- id: Kodi Pause
  alias: Kodi Pause
  trigger:
  - entity_id: sensor.last_ir
    platform: state
    to: '1908312'
  condition: []
  action:
  - data:
      entity_id: media_player.kodi_main
    service: media_player.media_play_pause

know my tv remote can pause/play my kodi box

Playing and pausing are working ok.

It’s if i pause then resume, the “state” doesn’t go back to playing.

So the video resumes playing fine, but HA Thinks it’s paused. So the state is not updating when playback is resumed

I am trying to create an automation for when Kodi is playing, and another automation for when it is paused.

Just FYI, mine works. Maybe something to do with Kodi version? I’m using Librelec fully updated
Only problem I had was about a week ago, HA couldn’t read the state of the Kodi when first turned on. I had to press the power button on lovelace to read correct value(it showed off). But it fixed itself