non7top
December 18, 2018, 10:48pm
1
Hello all,
I’m trying to extend existing code for samsung tv media player component to expose additional attributes, but can’t make them show up in Filter attributes section in ui
https://hastebin.com/utuwataqom.py line 226
Trying to do it same way as here https://github.com/home-assistant/home-assistant/blob/dev/homeassistant/components/media_player/sonos.py#L410
But having 0 luck with that. Looks as if it is just filtered based on name, but I see no code in sonos.py suggesting that attribute specifically allowed.
Thanks for any help.
non7top
December 20, 2018, 2:11am
2
Thanks to this resurrected thread
Hello,
I need some Python help. I was able to implement the python-maxcube-api with that code:
import logging
from homeassistant.components.climate import (PRECISION_TENTHS, STATE_COOL, STATE_HEAT, STATE_IDLE, ClimateDevice, PLATFORM_SCHEMA)
from homeassistant.const import (TEMP_CELSIUS, TEMP_FAHRENHEIT, ATTR_TEMPERATURE)
from maxcube.connection import *
from maxcube.cube import *
from maxcube.device import *
from maxcube.thermostat import *
REQUIREMENTS = ['python-maxcube-api']
CONF_IP = …
This is what I needed
@property
def device_state_attributes(self):
"""Return the device specific state attributes."""
return {"model": "test"}
Pretty weird unnecessarily hardcoded stuff.