Custom Components
My Components¶
Here are components developed by me.
MPKK¶
This custom component fetches information from Cracow live transport system with information when next train or bus will be on specified
sensor:
- platform: mmpk
name: 'Jarzebiny'
stop_id: 2685
direction: 'Bronowice Małe'
You can install it from this repository
It will rain¶
This simple sensor just checks forecast for next few hours, and switches on if there is chance of rain. I use this with simple automation, to notify about next rain by switching blue light:
- alias: Switch on blue light alert if it is going to rain
trigger:
platform: state
entity_id: sensor.it_will_rain
to: 'on'
condition:
condition: and
conditions:
- condition: state
entity_id: group.family
state: 'home'
- condition: time
after: '7:00:00'
before: '23:59:59'
action:
- service: light.turn_on
data:
entity_id: light.gatewa_ambient_light
rgb_color: [0,190,255]
brightness: 45
Samsung Multiroom¶
This custom component is used for controlling volume, and source of my multiroom device like Samsung Soundbar K650. It is based on unofficial api. This component is based on my older code from this repository
media_player:
- platform: samsung_multi_room
name: "Soundbar" # name, otherwise it will use name of your soundbar
host: 192.168.1.227 # ip of your soundbar
max_volume: 20 # on this level glass breaks, and there are 80 levels more on K650...
KKM¶
This component fetch information about my train card from www.mpk.krakow.pl and creates sensor with information about how many days is left before expiration and on what tram lines it can be used for.
- platform: kkm
name: Tram card
identity: 12345678
city_card: 12345678
Lunching¶
Used for fetching information from lunching.pl about what did I order to eat in work. Sensor contains information when food will be delivered and what was ordered.
- platform: lunching
name: foooooooood
username: macbury
password: secret password here
Cracow Air Quality¶
Simple integration with Air Quality stations in Cracow for getting "fresh" information. Data is fetched from Cracow Air Quality Monitoring Page
- platform: cracow_air_quality
station_id: 7
name: 'nowa_huta'
Harvest¶
Integration with harvest time tracking software. Mainly used for sending notification that work is done, and I should take my ass back to home.
- platform: harvest
name: work
account_id: 1234
token: morphing-power-token
Spotify Cover Sensor¶
This platform extracts colors from currently played song cover. If proper scene is activated, these colors are used for setting light color:
- platform: spotify_cover_sensor
cache_path: '/config/spotify-token-cache.json'
Depracated components¶
These are components written by me and have been removed from my setup
PublicTransit¶
Public transit uses data collected by busix software that scraps Cracow public transit webpage and extracts departures of buses and trains. You can specify in component starting line stop and target line stop and system will refresh and calculate next departure. There is also custom lovelace component for displaying data.
- platform: public_transit
name: work
from: "Białucha"
to: "Wzgórza Krzesławickie"
endpoint: "http://busix:5000/api"
Third party components¶
Here are components written by other people that are not in HomeAssistant core.
Alexa Media Player¶
This component exposes all my alexa devices as media player. I can also use built in annoucment feature and send audio notifications.
Google Geocode¶
The google_geocode
sensor converts device tracker location into a human-readable address. Mainly used for checking in what city currently each device is.