Split configuration - input_datetime and input_number

Hi

Why can’t I split my input_datetime yaml files into two?

I have set up two different activities on HA - still pretty basic, but trying to start out with organised folders. I have a ‘fish tank’ topic and a ‘energy meter’ topic.

I want a folder system like
./power/ to contain all the automations, scirpts, inputs, etc for the electricity topic
./fish_tank/ to contain the stuff for the fish tank

this works:

#POWER METER CONFIG
automation 1: !include power/p_automation.yaml
binary_sensor 1: !include power/p_binary_sensor.yaml
sensor 1: !include power/p_sensor.yaml
notify 1: !include power/p_notify.yaml

# FISH TANK CONFIG
automation 2: !include fish_tank/ft_automation.yaml
script 2: !include fish_tank/ft_script.yaml
sensor 2: !include fish_tank/ft_sensor.yaml

# GENERAL CONFIG
group: !include groups.yaml
automation: !include automations.yaml
script: !include script.yaml
scene: !include scenes.yaml
frontend:
  themes: !include themes.yaml
sensor: !include sensors.yaml

input_datetime: !include input_datetime.yaml
input_number: !include input_number.yaml

# Configure a default setup of Home Assistant (frontend, api, etc)
default_config:
//other stuff here 

but when i tried to split the input_number and input_datetime out, it wouldn’t load them nicely, so they are back in the main folder

my p_input_datetime file is

  solar_meter_reading_change:
    name: solar meter last reading
    has_date: true
    has_time: true
  grid_meter_reading_change:
    name: grid meter last reading
    has_date: true
    has_time: true

and ft_input_datetime is

  tv_state_change_1:
    name: This TV change
    has_date: true
    has_time: true
  tv_state_change_2:
    name: Prev TV change
    has_date: true
    has_time: true
  fish_tank_control_to:
    name: Turn Pump on whatever at
    has_date: false
    has_time: true
  fish_tank_control_from:
    name: Allow Pump automation from
    has_date: false
    has_time: true

my understanding you can’t treat the input_datetime: the same as automation 2:

what about going down the packages path way

this lets put

lights , switchs , scripts , automations into one file

also have a look at

@frenck github

https://github.com/frenck/home-assistant-config/tree/master/config

and his

should point down a path

1 Like

Fantastic, that solved it
Moved the folders into ./packages/ and added the type to the top of each one (e.g. automation: to the top of power_automation.yaml). Removed all the includes and replaced with

homeassistant:      
    packages: !include_dir_named packages

# GENERAL CONFIG
1 Like