HI,
Plex runs on my NAS, which switches Off during night time.
Consequently, Plex sensor in my HA setup causes endless errors while trying to connect.
I have both plex sensor
- platform: plex
icon: mdi:plex
host: !secret plex_ip
port: 32400
username: !secret plex_username
password: !secret plex_password
and plex mediaplayer
- platform: plex
entity_namespace: 'plex'
include_non_clients: false
scan_interval: 30
show_all_controls: true
use_custom_entity_ids: true
use_episode_art: true
setup in my configuration.
Is it somehow possible to have these sensors not connect during NAS-off time, or maybe, only have these sensors created during ON time? Possibly with templates for the time and creation entities? Maybe sensing mqtt events?
simplest of course would be a plain condition: between 0630 am and 2330 pm statement…
i have several dynamically created sensors python scripts, but these Plex-sensors go beyond something like:
has.states.set(‘sensor.plex’, ‘’, {
‘entity_picture’: ‘/local/modes/plex.png’,
‘friendly_name’: ‘’
‘unit_of_measurement’: ‘Plex’,
‘hidden’: hidden,
‘order’: order
})
(crude copy, paste)
If this would somehow be possible, it would be even greater to let the sensor read the time settings on the NAS, but that would definitely be phase 2
Hope someone can help,
Thanks,
Marius