rbdubz3 wrote:I'll give a look at the divider dot with Custom States.. BTW.. Can this be used for Custom Controls as well?
Also, thought I saw a plugin that had some specific info show in the 'State' column of the Device list of the main indigo window.. Can this list value be overridden?
# API v1.x -- You update each state value individually
dev.updateStateOnServer('onOffState', value=True, uiValue= display_value)
# API 2.x -- You can add many device state value changes to the list and update them all at once.
weather_states_list = []
weather_states_list.append({'key': 'onOffState', 'value': True, 'uiValue': display_value})
dev.updateStatesOnServer(weather_states_list)
rbdubz3 wrote:Thanks Dave!
Do you know if it is also possible to dynamically update the icons and text shown in the 'State' column of the device browser? I found some chatter on an older archived post. However, I was hoping I could update the icon in the list based on my custom state (not sure if this will work for a device that extends the indigo dimmer)
indigo.server.log("state image selector: " + str(dev.displayStateImageSel))
dev.updateStateImageOnServer(indigo.kStateImageSel.SprinklerOff)
dev.updateStateImageOnServer(indigo.kStateImageSel.SprinklerOn)
dev.updateStateImageOnServer(indigo.kStateImageSel.HvacCooling)
dev.updateStateImageOnServer(indigo.kStateImageSel.PowerOn)
dev.updateStateImageOnServer(indigo.kStateImageSel.SensorOn)
dev.updateStateImageOnServer(indigo.kStateImageSel.TimerOn)
indigoDevice.updateStateOnServer("statusDisplay", "CircAuto:OFF")
rbdubz3 wrote:
- Code: Select all
indigoDevice.updateStateOnServer("statusDisplay", "CircAuto:OFF")
That appeared to update the state value just fine, but I was expecting it to also be updated in the 'State' list column.. Maybe it is an issue for this device that extends 'dimmerType'?
dev.updateStateOnServer('onOffState', value=True, uiValue='43 ºF')
dev.updateStateImageOnServer(indigo.kStateImageSel.TemperatureSensorOn)
indigoDevice.updateStateOnServer("brightnessLevel", value=indigoDevice.states['brightnessLevel'], uiValue="CircAuto:ON".ljust(5) + str(indigoDevice.states['brightnessLevel']))
<UiDisplayStateId>statusDisplay</UiDisplayStateId>
<States>
<State id="statusDisplay">
<ValueType>String</ValueType>
<TriggerLabel>statusDisplay</TriggerLabel>
<ControlPageLabel>statusDisplay</ControlPageLabel>
</State>
<State id="circadianEnabled">
<ValueType>Boolean</ValueType>
<TriggerLabel>Circadian Enabled</TriggerLabel>
<ControlPageLabel>Circadian Enabled</ControlPageLabel>
</State>
</States>
rbdubz3 wrote:So my guess is that UiDisplayStateId only works for a true custom plugin?
Users browsing this forum: No registered users and 4 guests